package com.sh1604.duitang.activity;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.webkit.WebView;
import android.widget.Toast;

import com.sh1604.duitang.R;
import com.sh1604.duitang.mybean.Bean;

import java.util.ArrayList;

public class HomeItemClickActivity extends AppCompatActivity {

    private String url;
    private ArrayList<String> urlList;
    private Bean.DataBean.ObjectListBean bean;
    private WebView wv;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_home_item_click);
        wv = (WebView) findViewById(R.id.wv);
        getExtra();
    }

    private void getExtra() {
        Intent intent = getIntent();
        bean = (Bean.DataBean.ObjectListBean) intent.getSerializableExtra("bean");
        String target = bean.getTarget();
        String url = target.substring(target.indexOf("http"),target.length());
        wv.loadUrl(url);
       // wv.getSettings().setBlockNetworkImage(false);
    }


}
